package com.springboot.middleware.middleware_lock.model.entity;

import java.math.BigDecimal;

public class UserAccount {
    /**
     * 主键id
     *
     * @mbg.generated Thu Jan 13 14:52:21 CST 2022
     */
    private Integer id;

    /**
     * 用户账户id
     *
     * @mbg.generated Thu Jan 13 14:52:21 CST 2022
     */
    private Integer userId;

    /**
     * 账户余额
     *
     * @mbg.generated Thu Jan 13 14:52:21 CST 2022
     */
    private BigDecimal amount;

    /**
     * 版本号
     *
     * @mbg.generated Thu Jan 13 14:52:21 CST 2022
     */
    private Integer version;

    /**
     * 是否有效账户
     *
     * @mbg.generated Thu Jan 13 14:52:21 CST 2022
     */
    private Byte isActive;

    public UserAccount() {
    }

    public UserAccount(Integer id, Integer userId, BigDecimal amount, Integer version, Byte isActive) {
        this.id = id;
        this.userId = userId;
        this.amount = amount;
        this.version = version;
        this.isActive = isActive;
    }

    /**
     * 获取主键id
     *
     * @return the value of user_account.id
     * @mbg.generated Thu Jan 13 14:52:21 CST 2022
     */
    public Integer getId() {
        return id;
    }

    /**
     * 设置主键id
     *
     * @param id the value for user_account.id
     * @mbg.generated Thu Jan 13 14:52:21 CST 2022
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 获取用户账户id
     *
     * @return the value of user_account.user_id
     * @mbg.generated Thu Jan 13 14:52:21 CST 2022
     */
    public Integer getUserId() {
        return userId;
    }

    /**
     * 设置用户账户id
     *
     * @param userId the value for user_account.user_id
     * @mbg.generated Thu Jan 13 14:52:21 CST 2022
     */
    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    /**
     * 获取账户余额
     *
     * @return the value of user_account.amount
     * @mbg.generated Thu Jan 13 14:52:21 CST 2022
     */
    public BigDecimal getAmount() {
        return amount;
    }

    /**
     * 设置账户余额
     *
     * @param amount the value for user_account.amount
     * @mbg.generated Thu Jan 13 14:52:21 CST 2022
     */
    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    /**
     * 获取版本号
     *
     * @return the value of user_account.version
     * @mbg.generated Thu Jan 13 14:52:21 CST 2022
     */
    public Integer getVersion() {
        return version;
    }

    /**
     * 设置版本号
     *
     * @param version the value for user_account.version
     * @mbg.generated Thu Jan 13 14:52:21 CST 2022
     */
    public void setVersion(Integer version) {
        this.version = version;
    }

    /**
     * 获取是否有效账户
     *
     * @return the value of user_account.is_active
     * @mbg.generated Thu Jan 13 14:52:21 CST 2022
     */
    public Byte getIsActive() {
        return isActive;
    }

    /**
     * 设置是否有效账户
     *
     * @param isActive the value for user_account.is_active
     * @mbg.generated Thu Jan 13 14:52:21 CST 2022
     */
    public void setIsActive(Byte isActive) {
        this.isActive = isActive;
    }

    @Override
    public String toString() {
        return "UserAccount{" +
                "id=" + id +
                ", userId=" + userId +
                ", amount=" + amount +
                ", version=" + version +
                ", isActive=" + isActive +
                '}';
    }
}